<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="css/style.css">
	    <link rel="stylesheet" type="text/css" href="css/960.css">
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/text.css">
	<link rel="stylesheet" type="text/css" href="css/listNews.css">
	
	<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/index.js"></script>
  </head>
  
  <body>
  <div class="container_12 menu">
    <ul>
    <li><a href="linkIndexAction.do">发布新闻页</a></li>
	<li><a href="linkListAction.do?xinwen">新闻</a></li>
    <li><a href="linkListAction.do?tongzhi">通知公告</a></li>
    <li><a href="linkListAction.do?dangzheng">党政工作</a></li>
    <li><a href="linkListAction.do?xuesheng">学生工作</a></li>
    <li><a href="linkListAction.do?zhaosheng">招生信息</a></li>
    <li><a href="linkListAction.do?jiaoxue">教学工作</a></li>
    <li><a href="linkListAction.do?hezuo">合作交流</a></li>
    <li><a href="linkListAction.do?shixi">实习就业</a></li>
    <li><a href="linkListAction.do?xueshu">学术研究</a></li>
    <li><a href="linkListAction.do?keyan">科研项目</a></li>
    <li><a href="linkListAction.do?wendang">文档下载</a></li>
        <li><a href="toModifyPassword.do">修改密码</a></li>
    <li><a href="logoutAction.do">退出登录</a></li>

    </ul>
    </div>
	<div id = "right" style="width: 80%;margin-left: 120px;float:left;background:#eeefdd;padding:10px;" >
		<form action="pubNewsAction.do" method="post" enctype="multipart/form-data"  >
			<div style="float:left;">文章标题<input type="text" id="title" name="news.title" ></div>
			<div style="float:left;">文章类别：<select name="news.c_id">
					<option value="tongzhi">通知公告</option>
					<option value="xinwen">新闻中心</option>
					<option value="dangzheng">党政工作</option>
					<option value="xuesheng">学生工作</option>
					<option value="xueshu">学术研究</option>
					<option value="keyan">科研项目</option>
					<option value="jiaoxue">教学工作</option>
					<option value="wendang">文档下载</option>
					<option value="hezuo">合作交流</option>
					<option value="shixi">实习就业</option>
			</select></div><br><br>
			<div style="float:left;">文章作者<input type="text" id="author" name="news.author"></div>
			<div style="float:left;">发布时间<input type="text" id="datetime" name="news.p_time"></div>
			<textarea rows="4" cols="60" name="news.content" enctype="multipart/form-data" id="content" ></textarea>
			<div style="float:left;">设置成首页图片新闻：<input type="radio" value="1" id="hoty" name="news.hot" onchange="show()">是
			<input type="radio" value="0" id="hotn" name="news.hot" onchange="hide()" checked="checked">否<br>
			<div id="imgurl" style="display:none;">图片链接地址：<input type="text" name="news.imgurl" ><br></div>
			</div>
			<input id="submit" type="submit" value="发布" style="height: 50px;width:200px;background: #40aa52;color:#000;margin-left:880px;font-size: 20px;border:none;"><br>
	</form>
	</div>
</div>
<script type="text/javascript">
	window.onload=function(){
	var oFCKeditor = new FCKeditor('news.content') ;
	oFCKeditor.BasePath = "fckeditor/";
	oFCKeditor.ReplaceTextarea();
	}
</script>
	<!--检查必填选项是不是为空，并设置默认值  -->
<script type="text/javascript">
	//检查必填选项是不是为空，并设置默认值
	$(document).ready(function(){
	setValue();
	});
</script>
<script type="text/javascript">
function show(){
	if($("#hoty").val()=='1'){
	$("#imgurl").css("display","");
	}
}
function hide(){ if($("#hotn").val()=='0'){
		$("#imgurl").css("display","none");
	}
}

</script>
</body>
</html>
